package cn.zhou.student.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;


@Controller
public class LoginController {

    /**
     * 跳转到登录页面
     *
     * @return
     */
    @GetMapping(value = "/login")
    public String toLogin() {
        return "login";
    }

   @PostMapping("/doLogin")
   public String doLogin(){
       return "";
   }
    @RequestMapping("/logout")
    public String doLogout(HttpSession session) {
        session.invalidate();
        return "redirect:/login";
    }
    @GetMapping(value = "/page")
    public String page() {
        return "redirect:/student/getConditionPageStudent";
    }


}
